<template>
	<view class="container">
		<!-- 头部标签 -->
		<view class="hear-box" :style="{ paddingTop: top + 'px', height: height + 'px' }">
			<view class="header-title">
				<tui-icon name="arrowleft" color="#000" @tap="goBack"></tui-icon>
				<view>发布</view>
			</view>
			<view class="fabiao-btn" v-if="winInfo.hostName != 'WeChat'">发表</view>
		</view>
		<view class="container1" :style="{ paddingTop: height + 'px' }">
			<!-- tab栏目 -->
			<view class="tab-class">
				<view class="tab-container">
					<view class="tab-box" :class="{ 'active-Box': index == currentTab }" v-for="(item, index) in tabs" @tap="change(index)">
						<image :src="item.image" mode="heightFix" style="height: 42rpx" v-if="index != 0"></image>
						<view>{{ item.name }}</view>
						<image :src="item.image" mode="heightFix" style="height: 42rpx" v-if="index != 1"></image>
					</view>
				</view>
			</view>
			<view class="top-img">
				<image src="/static/images/huodong/pointBgc.png" style="width: 100%; height: 100%; position: absolute; top: 0; left: 0; z-index: -1"></image>
				<image src="/static/images/huodong/point.png" mode="widthFix"></image>
				<view>发布文章/活动得积分奖励，用积分抽取大奖吧！</view>
			</view>
			<view class="fabuWZ-info">
				<view v-if="currentTab == 0" style="display: flex; width: 100%; justify-content: flex-start; flex-direction: column; gap: 16rpx">
					<view class="mainInfo-box">
						<view class="image-list">
							<uni-file-picker
								:value="FormData.Fengmian"
								file-mediatype="image"
								limit="1"
								@success="success"
								sourceType="['album', 'camera']"
								@select="SelectImage($event, 'Fengmian')"
								@delete="deleteImage($event, 'Fengmian')"
							>
								<view class="add-image" style="width: 180rpx; height: 160rpx">
									<tui-icon name="plus" color="#979797" size="30" bold="true"></tui-icon>
									<view>添加封面</view>
								</view>
							</uni-file-picker>
						</view>

						<view class="Biaoti-info" style="margin-top: 30rpx">
							<input
								type="text"
								maxlength="20"
								style="font-family: PingFang SC, PingFang SC; font-weight: 800; font-size: 32rpx; text-align: left; font-style: normal; text-transform: none"
								v-model="FormData.Biaoti"
								placeholder="添加标题"
							/>
						</view>
						<view class="Biaoti-info" style="height: 150rpx">
							<!-- <sp-editor id="editor" @init="initEditor" @input="inputOver" @upinImage="upinImage" @addLink="addLink"></sp-editor> -->
							<textarea v-model="FormData.BijiNR" placeholder="描述一下文章内容" maxlength="1000"></textarea>
							<view class="num-count">{{ FormData.BijiNR ? FormData.BijiNR.length + '/1000' : '0/1000' }}</view>
						</view>
						<view class="image-list">
							<shmilydragimage
								:enableDel="enableDel"
								enableDel="true"
								colNum="4"
								:rowNum="rowNum"
								@delImg="deleteImage($event, 1)"
								:imgList.sync="FormData.TupianMS"
								@moveEndList="moveEndList"
							>
								<view class="add-image" @tap="selectFile()" v-if="FormData.TupianMS && FormData.TupianMS.length < 9">
									<tui-icon name="plus" color="#979797" size="30" bold="true"></tui-icon>
									<view>添加图片描述</view>
								</view>
							</shmilydragimage>
						</view>
						<view class="BQ-container">
							<view class="BQ-box" @tap="FormData.Biaoqian.splice(index, 1)" v-for="(item, index) in FormData.Biaoqian">
								{{ item.name ? `#${item.name}` : item }}
							</view>
						</view>

						<view class="BQ-container" style="margin-top: 48rpx">
							<view class="BQ-box" @tap="addHt">#话题</view>
							<view class="BQ-box">@用户</view>
						</view>

						<view class="Line-container">
							<view class="Line-box">
								<view class="left-box">
									<image src="/static/images/my/address.png"></image>
									<view>所在位置</view>
								</view>
								<view class="right-box" @tap="chooseLocation">
									<view class="noAddress" v-if="!FormData.SuozaiWZ || !FormData.SuozaiWZ.name">
										<image src="/static/images/my/light.png"></image>
										<view class="">打开位置让更多人看到</view>
									</view>
									<view v-else class="noAddress">
										<image src="/static/images/my/light.png"></image>
										<view class="location-name">
											{{ FormData.SuozaiWZ.name }}
										</view>
									</view>
									<image src="/static/images/my/right.svg" class="right-img"></image>
								</view>
							</view>
							<view class="Line-box" @tap="whoLookPopup = true">
								<view class="left-box">
									<image src="/static/images/my/nolook.png"></image>
									<view>谁可以看</view>
								</view>
								<view class="right-box">
									<view class="right-box-info">
										{{ FormData.Kejian }}
									</view>
									<image src="/static/images/my/right.svg" class="right-img"></image>
								</view>
							</view>
						</view>
					</view>

					<view class="common-container">
						<view class="common-box">
							<view class="common-title">
								活动分类
								<span style="color: red">*</span>
							</view>
							<view class="common-right">
								<picker mode="selector" :range="BijiArray" range-key="Value" @change="bijiFlchange">
									<input type="text" v-model="FormData.BijiFL" placeholder="请选择活动分类" />
								</picker>
								<tui-icon name="arrowright" color="#999" size="20"></tui-icon>
							</view>
						</view>
					</view>
				</view>
				<view v-else style="display: flex; width: 100%; justify-content: flex-start; flex-direction: column; gap: 16rpx">
					<view class="mainInfo-box">
						<view class="Biaoti-info" style="margin-top: 30rpx">
							<input
								type="text"
								maxlength="20"
								style="font-family: PingFang SC, PingFang SC; font-weight: 800; font-size: 32rpx; text-align: left; font-style: normal; text-transform: none"
								v-model="FormData.Biaoti"
								placeholder="活动名称"
							/>
						</view>
						<view class="Biaoti-info" style="height: 150rpx">
							<!-- <sp-editor id="editor" @init="initEditor" @input="inputOver" @upinImage="upinImage" @addLink="addLink"></sp-editor> -->
							<textarea v-model="FormData.BijiNR" placeholder="描述一下活动亮点、活动内容、推荐的人群、贴心tips~" maxlength="1000"></textarea>
							<view class="num-count">{{ FormData.BijiNR ? FormData.BijiNR.length + '/1000' : '0/1000' }}</view>
						</view>

						<view class="BQ-container">
							<view class="BQ-box" @tap="FormData.Biaoqian.splice(index, 1)" v-for="(item, index) in FormData.Biaoqian">
								{{ item.name ? `#${item.name}` : item }}
							</view>
						</view>
						<view class="image-list">
							<shmilydragimage
								:enableDel="enableDel"
								enableDel="true"
								colNum="4"
								:rowNum="rowNum"
								@delImg="deleteTupianMS($event, 1)"
								:imgList.sync="FormData.TupianMS"
								@moveEndList="moveEndList"
							>
								<view class="add-image" @tap="chooseImg()" v-if="FormData.TupianMS && FormData.TupianMS.length < 9">
									<tui-icon name="plus" color="#979797" size="30" bold="true"></tui-icon>
									<view>活动展示图</view>
								</view>
							</shmilydragimage>
						</view>
						<view class="BQ-container" style="margin-top: 48rpx">
							<view class="BQ-box" @tap="addHt">#话题</view>
						</view>
					</view>
					<view class="common-container">
						<view class="common-box" @tap="chooseLocation">
							<view class="common-title">
								活动地点
								<span style="color: red">*</span>
							</view>
							<view class="common-right">
								<view style="font-size: 26rpx" :style="{ color: FormData.HuodongDD.Name || FormData.HuodongDD.address ? '#000' : '#9c9c9c' }">
									{{ FormData.HuodongDD.Name || FormData.HuodongDD.address ? FormData.HuodongDD.Name || FormData.HuodongDD.address : '请选择活动定位' }}
								</view>
								<tui-icon name="arrowright" color="#999" size="20"></tui-icon>
							</view>
						</view>
						<view class="common-box">
							<view class="common-title">
								详细地址
								<span style="color: red">*</span>
							</view>
							<view class="common-right">
								<input type="text" v-model="FormData.XiangxiDZ" placeholder="请输入详细地址/门牌号" />
								<tui-icon name="arrowright" color="#999" size="20"></tui-icon>
							</view>
						</view>
					</view>
					<view class="common-container">
						<view class="common-box">
							<view class="common-title">
								活动分类
								<span style="color: red">*</span>
							</view>
							<view class="common-right">
								<picker mode="selector" :range="HDFlArray" range-key="Value" @change="HDFlChange">
									<input type="text" v-model="FormData.HuodongFL" placeholder="请选择活动分类" />
								</picker>
								<tui-icon name="arrowright" color="#999" size="20"></tui-icon>
							</view>
						</view>
						<view class="common-box">
							<view class="common-title">价格</view>
							<view class="common-right">
								<input type="digit" v-model="FormData.Jiage" placeholder="如需有活动费用请填写" />
								<tui-icon name="arrowright" color="#999" size="20"></tui-icon>
							</view>
						</view>
						<view class="common-box">
							<view class="common-title">
								活动组织者
								<span style="color: red">*</span>
							</view>
							<view class="common-right">
								<input type="text" v-model="FormData.HuodongZZZ"  placeholder="请选择活动组织者" />
								<tui-icon name="arrowright" color="#999" size="20"></tui-icon>
							</view>
						</view>
					</view>
					<view class="common-container">
						<view class="common-box">
							<view class="common-title">
								活动人数
								<span style="color: red">*</span>
							</view>
							<view class="common-right">
								<input type="number" v-model="FormData.CanyuRS" placeholder="请选择活动人数" />
								<tui-icon name="arrowright" color="#999" size="20"></tui-icon>
							</view>
						</view>
						<view class="common-box">
							<view class="common-title">
								活动时间
								<span style="color: red">*</span>
							</view>
							<view class="common-right">
								<uni-datetime-picker type="datetime" v-model="FormData.HuodongSJ" @change="changeDate($event, 'HuodongSJ')">
									<input type="text" :disabled="true" v-model="FormData.HuodongSJ" placeholder="请选择活动开始时间" />
								</uni-datetime-picker>
								<tui-icon name="arrowright" color="#999" size="20"></tui-icon>
							</view>
						</view>
						<view class="common-box">
							<view class="common-title">
								报名截止时间
								<span style="color: red">*</span>
							</view>
							<view class="common-right">
								<uni-datetime-picker type="datetime" v-model="FormData.BaomingJZSJ" @change="changeDate($event, 'BaomingJZSJ')">
									<input type="text" :disabled="true" v-model="FormData.BaomingJZSJ" placeholder="请选择报名截止时间" />
								</uni-datetime-picker>
								<tui-icon name="arrowright" color="#999" size="20"></tui-icon>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
		<view class="btn-container">
			<view class="caogao-btn" @tap="submitInfo(1)">存草稿</view>
			<view class="fabiao-btn" v-if="winInfo.hostName == 'WeChat'" @tap="submitInfo(0)" style="width: 80%; margin: auto; height: 80rpx; line-height: 80rpx">发布</view>
		</view>
	</view>

	<tui-bottom-popup backgroundColor="#F4F5F6" :zIndex="1002" :maskZIndex="1001" :show="whoLookPopup" @close="whoLookPopup = false">
		<view class="who-look-popup">
			<view class="dark-line"></view>
			<view class="popup-container">
				<view class="popup-box" @tap="changeWholook('公开可见')">
					<view class="left-box">
						<image src="/static/images/my/nolock.png"></image>
						<view>公开所见</view>
					</view>
					<view class="right-box" v-if="FormData.Kejian == '公开可见'">
						<tui-icon name="check" color="red" size="20"></tui-icon>
					</view>
				</view>
				<view class="popup-box" style="border: 0" @tap="changeWholook('仅自己可见')">
					<view class="left-box">
						<image src="/static/images/my/lock.png"></image>
						<view>仅自己可见</view>
					</view>
					<view class="right-box" v-if="FormData.Kejian == '仅自己可见'">
						<tui-icon name="check" color="red" size="20"></tui-icon>
					</view>
				</view>
				<!-- <view class="popup-box" style="border: 0">
				<view class="left-box">
					<image src="/static/images/my/onlylook.png"></image>
					<view>不给谁看</view>
				</view>
				<view class="right-box">
					<image src="/static/images/my/right.svg" class="right-img"></image>
				</view>
			</view> -->
			</view>
			<!-- <view class="popup-container">
			<view class="popup-box">
				<view class="left-box">
					<image src="/static/images/my/canlook.png"></image>
					<view>只给谁看</view>
				</view>
				<view class="right-box">
					<image src="/static/images/my/right.svg" class="right-img"></image>
				</view>
			</view>
			<view class="popup-box" style="border: 0" @tap="changeWholook('仅互关好友可见')">
				<view class="left-box">
					<image src="/static/images/my/huguan.png"></image>
					<view>仅互关好友可见</view>
				</view>
				<view class="right-box" v-if="FormData.Kejian == '仅互关好友可见'">
					<tui-icon name="check" color="red" size="20"></tui-icon>
				</view>
			</view>
		</view> -->
			<!-- <view class="popup-container">
			<view class="popup-box" style="border: 0" @tap="changeWholook('仅自己可见')">
				<view class="left-box">
					<image src="/static/images/my/lock.png"></image>
					<view>仅自己可见</view>
				</view>
				<view class="right-box" v-if="FormData.Kejian == '仅自己可见'">
					<tui-icon name="check" color="red" size="20"></tui-icon>
				</view>
			</view>
		</view> -->
		</view>
	</tui-bottom-popup>

	<!-- 话题圈 -->
	<tui-bottom-popup :zIndex="1002" height="800" :maskZIndex="1001" :show="HuatiModel" @close="HuatiModel = false">
		<view class="popup-container">
			<view class="popup-header">
				<view>话题圈</view>
				<view class="add-Pinglun" @tap="newHuatiShow">
					<tui-icon name="plus" color="#FB353B" size="20" bold="true"></tui-icon>
					<view>添加话题</view>
				</view>
			</view>
		</view>
		<view class="search-container">
			<view class="search-box">
				<image src="/static/images/company/search.svg"></image>
				<input style="width: 100%" @confirm="searchHuati" type="text" v-model="HuatiSearch" placeholder="搜索内容" placeholder-class="search-holder" />
			</view>
			<!-- <view class="search-btn" @tap="search">添加</view> -->
		</view>
		<view class="huati-box" @tap="addHuati(item)" v-for="item in HuatiInfo.Data" v-if="HuatiInfo.Data.length">
			<view>{{ item.HuatiM }}</view>
			<view style="font-size: 25rpx; color: #999999">{{ computeNum(item.FangwenL) }}</view>
		</view>
		<!-- 
	<view v-else class="no-Data">
		<image src="/static/images/my/noData.png" mode="widthFix"></image>
		<view class="">暂无数据</view>
	</view> -->
	</tui-bottom-popup>
	<tui-modal :show="huaTiModal" custom @cancel="huaTiModal = false">
		<view class="huatiadd-title">新增话题</view>
		<input class="huati-input" type="text" v-model="newHuatiInfo" maxlength="10" placeholder="请输入" />
		<view class="huatiAdd-btn" @tap="newHuatiAdd">新增</view>
	</tui-modal>
	<tui-bottom-popup :zIndex="1002" height="1200" :maskZIndex="1001" :show="frinedModal" @close="frinedModal = false">
		<view class="popup-container">
			<view class="popup-header">
				<view>关注用户</view>
				<tui-icon name="close" color="#999" size="20" @tap="frinedModal = false"></tui-icon>
			</view>
		</view>
		<view class="search-container">
			<view class="search-box">
				<image src="/static/images/company/search.svg"></image>
				<input style="width: 100%" @confirm="searchUser" type="text" v-model="guanzhuList.searchKey" placeholder="搜索用户" placeholder-class="search-holder" />
			</view>
		</view>
		<scroll-view scroll-y="true" style="height: 900rpx" @scrolltolower="getGuanzhuList">
			<view
				class="huati-box"
				style="justify-content: flex-start; gap: 16rpx"
				v-for="(item, index) in guanzhuList.Data"
				v-if="guanzhuList.Data.length"
				@tap="chooseUser(index)"
			>
				<tui-icon name="circle" size="20" color="#999" v-if="!item.Selected"></tui-icon>
				<tui-icon name="circle-fill" size="20" color="#FB353B" v-else></tui-icon>
				<image :src="item.Avatar" mode="aspectFill" class="avatar-img"></image>
				<view>{{ item.Name }}</view>
			</view>
		</scroll-view>
		<view class="fabiao-btn" style="margin: auto" @tap="frinedModal = false">确定</view>
	</tui-bottom-popup>
</template>

<script>
import MCascader from '@/components/m-cascader/m-cascader.vue';
import { uploadFile } from '@/utils/tool.js';
import shmilydragimage from '/components/xiaokeai-dragImage/xiaokeai-dragImage.vue';
export default {
	components: {
		shmilydragimage
	},
	data() {
		return {
			startTime: 0,
			Islogin: this.Microi.IsLogin(),
			CurrentUser: this.Microi.GetCurrentUser(),
			leftPopup: false,
			winInfo: {},
			height: 64, //header高度
			top: 26, //标题图标距离顶部距离
			scrollH: 0, //滚动总高度
			currentTab: 0,
			width: 375,
			HDFlArray: [],
			BijiArray: [],
			page: 0,
			guanzhuList: {
				Data: [],
				noData: false,
				page: 1,
				searchKey: ''
			},
			tabs: [
				{
					name: '文章',
					image: '/static/images/huodong/rich.svg'
				},
				{
					name: '活动发布',
					image: '/static/images/huodong/hdfabu.png'
				}
			],
			FormData: {
				Biaoti: '',
				BijiNR: '',
				TupianMS: [],
				Shipin: [],
				Biaoqian: [],
				HuodongDD: {},
				Kejian: '公开可见',
				aiteUser: [],
				Fengmian: [],
				CanyuRS: '',
				HuodongSJ: '',
				BaomingJZSJ: '',
				HuodongDD: {},
				SuozaiCS: '',
				XiangxiDZ: '',
				Jiage: '',
				HuodongFL: '',
				BijiFL: ''
			},

			isDisabled: false,
			whoLookPopup: false,
			editorCtx: null,
			HuatiModel: false,
			HuatiInfo: '',
			HuatiSearch: '',
			userSearch: '',
			HuatiInfo: {
				page: 1,
				noData: false,
				Data: []
			},
			huaTiModal: false,
			newHuatiInfo: '',
			frinedModal: false
		};
	},
	mounted() {
		let obj = {};
		// #ifdef MP-WEIXIN
		obj = wx.getMenuButtonBoundingClientRect();
		// #endif
		// #ifdef MP-BAIDU
		obj = swan.getMenuButtonBoundingClientRect();
		// #endif
		// #ifdef MP-ALIPAY
		my.hideAddToDesktopMenu();
		// #endif

		setTimeout(() => {
			uni.getSystemInfo({
				success: (res) => {
					this.width = obj.left || res.windowWidth;
					this.tabwidth = this.width * 0.45;
					this.height = obj.top ? obj.top + obj.height + 8 : res.statusBarHeight + 44;

					this.top = obj.top ? obj.top + (obj.height - 32) / 2 : res.statusBarHeight + 6;
					this.winInfo = res;
					this.scrollH = res.windowWidth;
				}
			});
		}, 0);
	},
	onLoad(options) {
		this.options = options;
		if (options.currentTab) this.currentTab = options.currentTab;
		if (options.Id) {
			this.getDataInfo();
		}
		this.getHDFl();
		this.getBijiFL();
	},
	onShow() {
		this.startTime = new Date();
	},
	onHide() {
		if (this.Islogin) {
			// 获取当前页面栈
			const pages = getCurrentPages();
			// 获取当前页面的对象
			const currentPage = pages[pages.length - 1];
			// 获取当前页面的路径
			const route = currentPage.route;
			// 获取当前页面的参数
			const options = currentPage.options;
			this.Microi.ApiEngine.Run('Add_liulanLog', {
				YemianCS: options,
				YemianDZ: route,
				LiulanSJC: new Date().getTime() - this.startTime.getTime()
			});
		}
	},
	onUnload() {
		if (this.Islogin) {
			// 获取当前页面栈
			const pages = getCurrentPages();
			// 获取当前页面的对象
			const currentPage = pages[pages.length - 1];
			// 获取当前页面的路径
			const route = currentPage.route;
			// 获取当前页面的参数
			const options = currentPage.options;
			this.Microi.ApiEngine.Run('Add_liulanLog', {
				YemianCS: options,
				YemianDZ: route,
				LiulanSJC: new Date().getTime() - this.startTime.getTime()
			});
		}
	},
	methods: {
		async getDataInfo() {
			var self = this;
			if (this.currentTab == 0) {
				var TableName = 'diy_Biji';
			} else if (this.currentTab == 1) {
				var TableName = 'diy_huodong';
			}
			var res = await self.Microi.ApiEngine.Run('get_FabuDetail', {
				Id: this.options.Id,
				TableName: TableName
			});
			this.FormData = res.Data;
			this.FormData.Fengmian = [];
		},
		async chooseLocation() {
			var self = this;
			await uni.chooseLocation({
				type: 'wgs84',
				success: function (res) {
					console.log(res, 'res');
					self.niDingli(res.latitude, res.longitude);
					const Dingwei = {
						Name: res.name,
						Detail: res.address
					};
					self.FormData.HuodongDD = Dingwei;
					self.FormData.HuodongDD_Lat = res.latitude;
					self.FormData.HuodongDD_Lng = res.longitude;
					console.log(self.FormData);
				}
			});
		},
		niDingli(latitude, longitude) {
			console.log(latitude, longitude);
			var self = this;
			var latitude = latitude;
			var longitude = longitude;
			uni.request({
				method: 'GET',
				//注意:这里的key值需要高德地图的 web服务生成的key  只有web服务才有逆地理编码
				url: `https://restapi.amap.com/v3/geocode/regeo?output=Json&location=${longitude.toFixed(6)},${latitude.toFixed(
					6
				)}&key=6255bb46ab873003124b1e9ce297e2d6&radius=800&extensions=all`,
				success(res) {
					// console.log("获取位置成功", res.data);
					const data = {
						longitude: longitude,
						latitude: latitude,
						address: res.data.regeocode.formatted_address,
						city: res.data.regeocode.addressComponent.city,
						province: res.data.regeocode.addressComponent.province,
						country: res.data.regeocode.addressComponent.country,
						district: res.data.regeocode.addressComponent.district
					};
					console.log(data, 'data');
					if (!data.city || !data.city.length) data.city = '市辖区';
					self.text = data.province + ' ' + data.city + ' ' + data.district;
					self.FormData.SuozaiCS = data.province + ' ' + data.city + ' ' + data.district;
					self.FormData.HuodongDD.Detail = data.address;
				},
				fail(err) {
					const str = JSON.stringify(err);
					wx.showToast({
						title: 'request_Fail' + err,
						icon: 'none',
						duration: 5000
					});
				}
			});
		},
		addHt() {
			if (!this.HuatiInfo.Data || !this.HuatiInfo.Data.length) {
				this.getHuatiList();
			}
			this.HuatiModel = true;
		},
		newHuatiShow() {
			this.newHuatiInfo = '';
			this.huaTiModal = true;
		},
		newHuatiAdd() {
			if (!this.newHuatiInfo) {
				this.Microi.Tips('请输入您要新增的话题', false);
				return;
			}
			this.HuatiInfo.Data.unshift({
				HuatiM: this.newHuatiInfo,
				FangwenL: 0,
				selected: true,
				newHuati: true
			});
			this.huaTiModal = false;
		},
		searchHuati() {
			this.HuatiInfo = {
				page: 1,
				noData: false,
				Data: []
			};
			this.getHuatiList();
		},
		async getHuatiList() {
			var self = this;
			var res = await self.Microi.ApiEngine.Run('get_HuatiList', {
				page: self.HuatiInfo.page,
				Key: self.HuatiSearch || ''
			});
			if (!res.Data.length) {
				self.HuatiInfo.noData = true;
				return;
			}
			if (self.HuatiInfo.page == 1) {
				self.HuatiInfo.Data = res.Data;
			} else {
				self.HuatiInfo.Data.push(...res.Data);
			}
			self.HuatiInfo.page++;
		},
		HDFlChange(e) {
			this.FormData.HuodongFL = this.HDFlArray[e.detail.value].Value;
		},
		bijiFlchange(e) {
			this.FormData.BijiFL = this.BijiArray[e.detail.value].Value;
		},
		computeNum(num) {
			num = num * 1;
			if (num > 10000) {
				return num / 10000 + 'w+';
			} else if (num > 1000) {
				return num / 1000 + 'k+';
			} else {
				return num;
			}
		},
		changeDate(e, name) {
			console.log(e, 'e');
		},
		addHuati(item) {
			this.FormData.Biaoqian.push({
				name: `${item.HuatiM}`,
				newHuati: item.newHuati
			});
			this.HuatiModel = false;
		},
		searchUser() {
			this.guanzhuList.Data = [];
			this.guanzhuList.page = 1;
			this.noData = false;
			this.getGuanzhuList();
		},
		frinedModalShow() {
			if (!this.guanzhuList.Data.length && !this.noData) {
				this.getGuanzhuList();
			}
			this.frinedModal = true;
		},
		async getGuanzhuList() {
			var self = this;
			if (self.guanzhuList.noData) return;
			var res = await self.Microi.ApiEngine.Run('get_myGuanzhuList', {
				YonghuID: self.CurrentUser.Id,
				page: self.guanzhuList.page,
				searchKey: self.guanzhuList.searchKey || ''
			});
			if (self.guanzhuList.page == 1 && !res.Data.length) {
				this.aiteUser = false;
				return 'noUser';
			} else if (!res.Data.length) {
				self.guanzhuList.noData = true;
				return;
			}
			self.guanzhuList.Data.push(...res.Data);
			self.guanzhuList.page++;
		},
		chooseUser(index) {
			this.guanzhuList.Data[index].Selected = !this.guanzhuList.Data[index].Selected;

			var aiteUser = this.FormData.aiteUser || [];
			var j = aiteUser.findIndex((val) => val.YonghuID === this.guanzhuList.Data[index].YonghuID); // 修正点
			if (j === -1) {
				aiteUser.unshift(this.guanzhuList.Data[index]);
			} else {
				aiteUser.splice(j, 1);
			}
			this.FormData.aiteUser = aiteUser;
		},
		// 照片上传
		async SelectImage(e, name) {
			console.log(e, name);
			uni.showLoading({
				title: '上传照片中',
				mask: true
			});
			var array = e.tempFilePaths;
			array.forEach(async (item) => {
				var res = await this.uploadImage(item);
				this.FormData[name].push(res);
			});
			console.log(this.FormData, 'formdata');
			setTimeout(function () {
				uni.hideLoading();
			}, 1000);
		},
		chooseImg() {
			var self = this;
			uni.chooseImage({
				count: 10 - this.FormData.TupianMS.length,
				success(e) {
					var array = e.tempFilePaths;
					array.forEach(async (item) => {
						var res = await self.uploadImage(item);
						self.FormData.TupianMS.push(res);
					});
				}
			});
		},
		deleteImage(e, name) {
			const index = this.FormData[name].findIndex((item) => item.Url == e.url);
			if (index > -1) {
				this.FormData[name].splice(index, 1);
			}

			console.log(this.FormData, 'this.FormData');
		},
		selectFile() {
			var self = this;
			uni.showActionSheet({
				itemList: ['选择图片', '选择视频'],
				success: function (res) {
					let count = res.tapIndex === 0 ? 9 : 1; // 根据用户选择设置count
					let mediaType = res.tapIndex === 0 ? ['image'] : ['video']; // 根据用户选择设置mediaType
					uni.chooseMedia({
						count: count,
						mediaType: mediaType,
						sourceType: ['album', 'camera'],
						// maxDuration: 60,
						success(res) {
							var image = [];
							if (res.tempFiles.length > 0) {
								res.tempFiles.forEach(async (file) => {
									if (file.fileType == 'video') {
										if (file.duration > 300) {
											// 检查视频时长是否超过5分钟
											self.Microi.Tips('不可上传超过5分钟的视频', false);
											return;
										} else if (file.size > 500 * 1024 * 1024) {
											// 检查视频大小是否超过500MB
											self.Microi.Tips('不可上传超过500MB的视频', false);
											return;
										}
										var res = await self.uploadFile(file.tempFilePath);
										res.fileType = file.fileType;
										self.FormData.TupianMS = [];
										self.FormData.TupianMS.push(res);
									} else {
										var res = await self.uploadImage(file.tempFilePath);
										res.fileType = file.fileType;
										if (self.FormData.TupianMS.length && self.FormData.TupianMS[0].fileType == 'video') self.FormData.TupianMS = [];
										self.FormData.TupianMS.push(res);
									}
								});
							}
						},
						fail(res) {
							console.log(res, 'failChoose');
						}
					});
				},
				fail(res) {
					console.log(res, 'fail');
				}
			});
		},
		changeWholook(type) {
			// type 0:公开可见 1:仅自己可见 2:部分好友可见 3 ：部分好友不可见 4:仅互关好友可见
			this.FormData.Kejian = type;
			this.whoLookPopup = false;
		},
		changePicker(e, name1, name2, value = 'Value') {
			this.FormData[name1] = this[name2][e.detail.value][value];
		},

		async submitInfo(Caogao = 0) {
			var self = this;
			if (self.isDisabled) {
				self.Microi.Tips('请勿重复点击', false);
				return;
			}
			self.isDisabled = true;
			var FormData = self.FormData;
			if (self.currentTab == 0) {
				if (!FormData.Biaoti) {
					self.Microi.Tips('请填写标题', false);
					self.isDisabled = false;
					return;
				}
				if (!FormData.BijiNR) {
					self.Microi.Tips('请填写笔记内容', false);
					self.isDisabled = false;
					return;
				}
				if (FormData.TupianMS && FormData.TupianMS.length && FormData.TupianMS[0].fileType == 'video' && !FormData.Fengmian) {
					self.Microi.Tips('请上传视频封面', false);
					self.isDisabled = false;
					return;
				}
				console.log(FormData, 'formdata');
				if (FormData.Kejian == '仅自己可见') {
					Row.Caogao = 1;
				}
				if (FormData.aiteUser && FormData.aiteUser.length) FormData.yongHID = FormData.aiteUser;

				if (FormData.TupianMS && FormData.TupianMS.length) {
					if (FormData.TupianMS[0].fileType == 'video') {
						FormData.Shipin = FormData.TupianMS[0].Path;
					} else {
						FormData.Shipin = '';
					}
				} else {
					FormData.Shipin = '';
				}
			} else {
				if (!FormData.TupianMS.length) {
					self.Microi.Tips('请选择活动展示图', false);
					self.isDisabled = false;
					return;
				} else if (!FormData.Biaoti) {
					self.Microi.Tips('请选择活动名称', false);
					self.isDisabled = false;
					return;
				} else if (!FormData.BijiNR) {
					self.Microi.Tips('请填写活动描述', false);
					self.isDisabled = false;
					return;
				} else if (!FormData.HuodongDD && !FormData.HuodongDD.Name && !FormData.HuodongDD.address) {
					self.Microi.Tips('请选择活动地点', false);
					self.isDisabled = false;
					return;
				} else if (!FormData.XiangxiDZ) {
					self.Microi.Tips('请填写详细地址', false);
					self.isDisabled = false;
					return;
				} else if (!FormData.HuodongFL) {
					self.Microi.Tips('请选择活动分类', false);
					self.isDisabled = false;
					return;
				} else if (!FormData.CanyuRS) {
					self.Microi.Tips('请填写参与人数', false);
					self.isDisabled = false;
					return;
				} else if (!FormData.HuodongSJ) {
					self.Microi.Tips('请选择活动开始时间', false);
					self.isDisabled = false;
					return;
				} else if (!FormData.BaomingJZSJ) {
					self.Microi.Tips('请选择报名截止时间', false);
					self.isDisabled = false;
					return;
				}
			}
			FormData.Id = this.options.Id || '';
			FormData.Caogao = Caogao;
			FormData.TableName = this.currentTab == 0 ? 'diy_Biji' : 'diy_huodong';
			var res = await self.Microi.ApiEngine.Run('Add_FabuInfo', {
				Row: FormData
			});
			self.isDisabled = false;
			if (res.Code == 1) {
				self.Microi.Tips('添加成功', true);
				setTimeout(function () {
					self.goBack();
				}, 500);
			} else {
				self.Microi.Tips(res.Msg, false);
			}
		},
		async getHDFl() {
			var self = this;
			var res = await self.Microi.ApiEngine.Run('customize_crud', {
				EngineKey: 'KEY000012'
			});
			self.HDFlArray = res.Data;
		},
		async getBijiFL() {
			var self = this;
			var res = await self.Microi.ApiEngine.Run('customize_crud', {
				EngineKey: 'KEY000011'
			});
			self.BijiArray = res.Data;
		},
		goBack() {
			if (this.backUrl) {
				uni.reLaunch({
					url: `/pages${this.backUrl}`
				});
			} else {
				let pages = getCurrentPages(); // 获取当前页面堆栈
				let pageCount = pages.length; // 页面堆栈中的页面数量
				// 判断是否有上级页面
				if (pageCount > 1) {
					// 如果有上级页面，则返回上级页面

					uni.navigateBack({
						delta: 1
					});
				} else {
					// 如果没有上级页面，则返回首页
					uni.switchTab({
						url: '/pages/tabbar/find/find' // 替换为你的首页路径
					});
				}
			}
		},
		change(index) {
			this.currentTab = index;
		},
		radioChange(e) {
			this.FormData.ShenqingGJ = this.ShenqingGJArray[e.detail.value];
			this.FormData.ShenqingDD = '';
		},

		deleteTupianMS(index, Type) {
			if (Type == 1) {
				this.FormData.TupianMS.splice(index, 1);
			} else {
				this.FormData.Shipin = [];
			}
		},
		async uploadImage(Path) {
			if (Path.indexOf('https://minio.nbweixin.cn/public') == -1) {
				console.log('into', Path);
				var res = await this.Microi.Upload({
					Path: '/img', // 文件路径前缀
					Limit: false, // 是否上传到私有存储桶
					Preview: true, // 是否压缩图片
					_FilePath: Path
				});
				if (res.Code == 1) {
					var obj = {
						Path: res.Data.Path,
						Name: res.Data.Name,
						Size: res.Data.Size,
						CreateTime: res.Data.CreateTime,
						Id: res.Data.Id,
						url: this.GetServerPath(res.Data.Path),
						name: res.Data.Name,
						extname: res.Data.Path.split('.')[1]
					};
					return obj;
				}
			} else {
				let endIndex = Path.indexOf('https://minio.nbweixin.cn/public');
				// code = url.substring(0,endIndex)
				var Path1 = Path.substring(0, endIndex);
				console.log(Path, 'Path');
				return Path1;
			}
		},
		async uploadFile(Path) {
			uni.showLoading({
				title: '上传中',
				mask: true
			});
			var res = await this.Microi.Upload({
				Path: '/file', // 文件路径前缀
				Limit: false, // 是否上传到私有存储桶
				Preview: 'true', // 是否压缩图片
				_FilePath: Path
			});
			uni.hideLoading();
			if (res.Code == 1) {
				var obj = {
					Path: res.Data.Path,
					Name: res.Data.Name,
					Size: res.Data.Size,
					CreateTime: res.Data.CreateTime,
					Id: res.Data.Id,
					url: this.GetServerPath(res.Data.Path),
					name: res.Data.Name,
					extname: res.Data.Path.split('.')[1]
				};

				return obj;
			}
		},
		GetServerPath(Path) {
			if (!Path) {
				return '';
			}
			return this.Microi.FileServer + Path;
		}
	}
};
</script>

<style>
page {
	background-color: #f4f5f6;
}
.container {
	padding-bottom: 150rpx;
}

.hear-box {
	display: flex;
	align-items: center;
	justify-content: space-between;
	box-sizing: border-box;
	padding: 20rpx;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	z-index: 1000;
	background-color: #FFF;
}
.header-title {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	font-weight: 800;
	font-size: 36rpx;
	color: #212121;
	text-align: left;
	font-style: normal;
	text-transform: none;
}
.container1 {
	width: 100%;
	padding: 30rpx;
	position: relative;
	box-sizing: border-box;
}
.btn-container {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16rpx;
	padding: 30rpx;
	box-sizing: border-box;
}
.caogao-btn {
	width: 170rpx;
	height: 80rpx;
	background: #f5f5f5;
	border-radius: 80rpx 80rpx 80rpx 80rpx;
	border: 2rpx solid #999999;

	line-height: 80rpx;
	font-family: PingFang SC, PingFang SC;
	font-weight: 800;
	font-size: 32rpx;
	color: #212121;
	text-align: center;
	font-style: normal;
	text-transform: none;
}
.fabiao-btn {
	width: 156rpx;
	height: 60rpx;
	background: #fb353b;
	border-radius: 16rpx 16rpx 16rpx 16rpx;

	font-weight: 500;
	font-size: 32rpx;
	color: #ffffff;
	line-height: 60rpx;
	text-align: center;
}
.tab-class {
	width: 100%;
	height: 80rpx;
	margin-bottom: 16rpx;
}
.tab-container {
	width: 100%;
	box-sizing: border-box;
	padding: 6rpx;
	height: 100%;
	background: #ffffff;
	border-radius: 16rpx 16rpx 16rpx 16rpx;

	display: flex;
	align-items: center;
	justify-content: space-between;
}
.tab-box {
	width: 50%;
	height: 100%;
	background: none;
	border-radius: 16rpx 16rpx 16rpx 16rpx;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8rpx;

	font-family: PingFang SC, PingFang SC;
	font-weight: 800;
	font-size: 28rpx;
	color: #666666;
	text-align: center;
	font-style: normal;
	text-transform: none;
}
.active-Box {
	background: linear-gradient(93deg, #fb353b 0%, #ffd8bc 100%) no-repeat;
	color: #fff;
}
.top-img {
	position: relative;
	width: 100%;
	height: 82rpx;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 6rpx;
	font-family: PingFang SC, PingFang SC;
	font-size: 24rpx;
	color: #000000;
	text-align: left;
	font-style: normal;
	text-transform: none;
	padding: 4rpx 24rpx;
	box-sizing: border-box;
}
.top-img image {
	width: 76rpx;
}
.fabuWZ-info {
	display: flex;
	justify-content: flex-start;
	flex-direction: column;
	gap: 16rpx;

	margin-top: -20rpx;
}
.mainInfo-box {
	background: #ffffff;
	border-radius: 16rpx 16rpx 16rpx 16rpx;
	padding: 32rpx 30rpx;
	box-sizing: border-box;
}
.input-box {
	display: flex;
	align-items: center;
	justify-content: space-between;
	/* margin: 34rpx 0 26rpx 0; */
	padding: 34rpx 0;
	box-sizing: border-box;
	/* border-bottom: 1rpx solid #f3f5f9; */
}
.textArea-box {
	display: block;
	align-items: center;
	justify-content: space-between;
	margin: 34rpx 0 26rpx 0;
	box-sizing: border-box;
}
.input-box1 {
	display: flex;
	align-items: center;
	justify-content: space-between;
	box-sizing: border-box;
}
.input-infotitle {
	font-family: PingFang SC, PingFang SC;
	font-size: 28rpx;
	font-weight: 400;
	color: #333;
	text-align: left;
	font-style: normal;
	text-transform: none;
}
.input-textArea {
	height: 196rpx;
	background: #eef0f1;
	box-sizing: border-box;
	border-radius: 16rpx 16rpx 16rpx 16rpx;
	border: 1rpx solid #f3f5f9;
	padding: 24rpx;
	margin-top: 12rpx;
}
textarea {
	/* font-weight: 500; */
	font-size: 26rpx;
	/* color: #666666; */
	line-height: 30rpx;
	text-align: left;
	font-style: normal;
	text-transform: none;
	height: 100%;
}
.input-tile {
	/* height: 40rpx; */
	width: 112rpx;
	font-weight: 500;
	margin-right: 24rpx;
	font-size: 28rpx;
	color: #333333;
	line-height: 33rpx;
	text-align: left;
	font-style: normal;
	text-transform: none;
	white-space: nowrap;
}
.input-info {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.input-info-b {
	width: 100%;
	background-color: #eef0f1;
	padding: 10rpx;
	border-radius: 120rpx 120rpx 120rpx 120rpx;
}
input {
	/* font-weight: 500; */
	font-size: 26rpx;
	color: #000;
	line-height: 30rpx;
	text-align: left;
	font-style: normal;
	text-transform: none;
}
picker {
	font-weight: 500;
	font-size: 26rpx;
	color: #000;
	line-height: 30rpx;
	text-align: left;
	font-style: normal;
	text-transform: none;
}
.input-info1 {
	/* width: 200rpx; */
	display: flex;
	align-items: center;
	justify-content: center;
	background: #eef0f1;
	border-radius: 120rpx 120rpx 120rpx 120rpx;
	box-sizing: border-box;
	padding: 10rpx 20rpx;
	gap: 14rpx;
	width: 192rpx;
}
radio-group {
	width: 100%;
}
.radio {
	display: flex;
	align-items: center;
	justify-content: flex-start;
}
.input-line {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	box-sizing: border-box;
	padding: 34rpx 0;
	gap: 34rpx;
	border-bottom: 1rpx solid #f3f5f9;
}
.down-img {
	width: 24rpx;
	height: 36rpx;
	margin: auto 0;
}
.Biaoti-info {
	margin-bottom: 40rpx;
	margin-left: 20rpx;
	position: relative;
}
.Biaoti-info textarea {
	width: 100%;
	height: 100%;
}
.num-count {
	position: absolute;
	bottom: 1%;
	right: 1%;
	font-family: Roboto, Roboto;
	/* font-weight: 400; */
	line-height: 52rpx;
	box-sizing: border-box;
	font-size: 25rpx;
	color: #666666;
}
.Biaoti-info input {
	font-family: PingFang SC, PingFang SC;
	/* font-weight: 500; */
	/* font-size: 32rpx; */
	color: #000;
	text-align: left;
	font-style: normal;
	text-transform: none;
}
.Biaoti-info textarea {
	font-family: PingFang SC, PingFang SC;
	/* font-weight: 500; */
	font-size: 28rpx;
	color: #000;
	text-align: left;
	font-style: normal;
	text-transform: none;
}
.image-list {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	flex-wrap: wrap;
	gap: 20rpx;
}
.image-info {
	position: relative;
}
.shut-info {
	position: absolute;
	top: 2%;
	right: 1%;
}
.image-info image {
	width: 180rpx;
	height: 180rpx;
	border-radius: 16rpx 16rpx 16rpx 16rpx;
}
.image-info video {
	width: 180rpx;
	height: 180rpx;
	border-radius: 16rpx 16rpx 16rpx 16rpx;
}
.add-image {
	height: 180rpx;
	background: #f4f5f6;
	border-radius: 16rpx 16rpx 16rpx 16rpx;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	font-family: PingFang SC, PingFang SC;
	font-size: 24rpx;
	color: #b4b4b4;
	text-align: center;
	font-style: normal;
	text-transform: none;
}
.BQ-container {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	flex-wrap: wrap;
	gap: 16rpx;
	margin: 16rpx 0;
}
.BQ-box {
	/* width: 148rpx; */
	padding: 0 16rpx;
	white-space: nowrap;
	height: 52rpx;
	background: #eef0f1;
	border-radius: 16rpx 16rpx 16rpx 16rpx;

	font-family: Roboto, Roboto;
	/* font-weight: 400; */
	line-height: 52rpx;
	box-sizing: border-box;
	font-size: 25rpx;
	color: #666666;
	text-align: center;
	font-style: normal;
	text-transform: none;
}
.common-container {
	background: #ffffff;
	border-radius: 16rpx 16rpx 16rpx 16rpx;
}
.common-box {
	height: 100rpx;
	background: #ffffff;
	border-radius: 16rpx 16rpx 16rpx 16rpx;
	border-bottom: 1rpx solid #f3f5f9;
	padding: 28rpx;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16rpx;
}
.common-title {
	font-family: PingFang SC, PingFang SC;
	font-weight: 500;
	font-size: 32rpx;
	color: #333333;
	text-align: left;
	font-style: normal;
	text-transform: none;
}
.common-right {
	width: 100%;
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: flex-end;

	font-family: PingFang SC, PingFang SC;
	font-size: 32rpx;
	color: #999999;
	text-align: right;
	font-style: normal;
	text-transform: none;
}
.common-right input,
picker {
	width: 100%;
	font-weight: normal;
	text-align: right;
}
.Line-container {
	/* 
	margin-top: 74rpx;
	margin-bottom: 80rpx; */
}

.Line-box {
	width: 100%;
	height: 88rpx;
	background: #ffffff;
	border-radius: 16rpx 16rpx 0rpx 0rpx;
	/* border: 1rpx solid #F3F5F9; */
	margin: auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.left-box {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 22rpx;

	font-family: PingFang SC, PingFang SC;
	/* font-weight: 500; */
	font-size: 32rpx;
	color: #333333;
	text-align: center;
	font-style: normal;
	text-transform: none;
}
.left-box image {
	width: 40rpx;
	height: 40rpx;
}
.right-box {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 24rpx;
}
.aiteuser-container {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 5rpx;

	font-family: PingFang SC, PingFang SC;
	/* font-weight: 500; */
	font-size: 28rpx;
	color: #999999;
	text-align: center;
	font-style: normal;
	text-transform: none;

	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	word-wrap: break-word;
}
.right-box-info {
	font-family: PingFang SC, PingFang SC;
	/* font-weight: 500; */
	font-size: 28rpx;
	color: #999999;
	text-align: center;
	font-style: normal;
	text-transform: none;
}
.noAddress {
	width: 354rpx;
	height: 50rpx;
	background: #eef0f1;
	border-radius: 40rpx 40rpx 40rpx 40rpx;

	display: flex;
	align-items: center;
	justify-content: center;

	font-family: PingFang SC, PingFang SC;
	/* font-weight: 500; */
	font-size: 28rpx;
	color: #666666;
	text-align: center;
	font-style: normal;
	text-transform: none;
}
.location-name {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	word-wrap: break-word;
}
.noAddress image {
	width: 48rpx;
	height: 48rpx;
}
.right-img {
	width: 24rpx;
	height: 24rpx;
	/* border-radius: 0rpx 0rpx 0rpx 0rpx;
border: 2rpx solid #999999; */
}
.who-look-popup {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	flex-direction: column;
	padding: 10rpx 20rpx;
}
.dark-line {
	width: 80rpx;
	height: 10rpx;
	background-color: #ccc;
	border-radius: 10rpx;
	margin-bottom: 20rpx;
}
.popup-container {
	background-color: #fff;
	color: #333;
	border-radius: 20rpx;
	padding: 15rpx;
	width: 100%;
	box-sizing: border-box;
	margin-bottom: 20rpx;
}
.popup-box {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 80rpx;
	border-bottom: 1rpx solid #f3f5f9;
}
.hashtag {
	color: #fb353b;
}
.search-container {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20rpx;
	margin: 20rpx 0;
}
.search-box {
	width: 95%;
	height: 68rpx;
	background: #f4f5f6;
	border-radius: 20rpx 20rpx 20rpx 20rpx;
	padding: 15rpx;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	box-sizing: border-box;
	gap: 10rpx;
}
.search-box image {
	width: 34rpx;
	height: 34rpx;
}
.search-holder {
	/* 
width: 166rpx;
height: 40rpx; */
	font-family: PingFang SC, PingFang SC;
	/* font-weight: 500; */
	font-size: 28rpx;
	color: #999999;
	text-align: left;
	font-style: normal;
	text-transform: none;
}
.search-btn {
	font-family: PingFang SC, PingFang SC;
	/* font-weight: 500; */
	font-size: 32rpx;
	color: #666666;
	text-align: left;
	font-style: normal;
	text-transform: none;
}
.huati-box {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16rpx;
	border-bottom: 1rpx solid #f2f2f2;
}
.avatar-img {
	width: 60rpx;
	height: 60rpx;
	border-radius: 50%;
}
.no-Data {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	font-size: 25rpx;
	color: #999999;
	margin: auto;
	margin-top: 200rpx;
}
.no-Data image {
	width: 200rpx;
}
.add-Pinglun {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 196rpx;
	height: 60rpx;
	background: #f4f5f6;
	border-radius: 30rpx 30rpx 30rpx 30rpx;
	gap: 12rpx;

	font-family: PingFang SC, PingFang SC;
	/* font-weight: 500; */
	font-size: 28rpx;
	color: #666666;
	text-align: left;
	font-style: normal;
	text-transform: none;
}
.add-Pinglun image {
	width: 36rpx;
	height: 36rpx;
}
.popup-container {
	padding: 20rpx;
}
.popup-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.tui-Btn-box_refuse {
	width: 276rpx;
	height: 72rpx;
	background: #fb353b;
	border-radius: 98rpx 98rpx 98rpx 98rpx;

	font-family: PingFang SC, PingFang SC;
	/* font-weight: 800; */
	font-size: 32rpx;
	color: #ffffff;
	text-align: center;
	font-style: normal;
	line-height: 72rpx;
	text-transform: none;
	margin: auto;
}
.pinglun-box {
	margin: 16rpx;
	margin-bottom: 0;

	font-family: PingFang SC, PingFang SC;
	/* font-weight: 500; */
	font-size: 28rpx;
	color: #333333;
	font-style: normal;
	text-transform: none;
	padding: 16rpx;
	box-sizing: border-box;
	border-bottom: 1rpx solid #f2f2f2;
}
.huatiadd-title {
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	font-size: 36rpx;
	color: #212121;
	text-align: left;
	font-style: normal;
	text-transform: none;
}
.huati-input {
	padding: 10rpx 0;
	border-bottom: 1rpx solid #f2f2f2;
}
.huatiAdd-btn {
	width: 50%;
	height: 60rpx;
	background: #fb353b;
	border-radius: 16rpx 16rpx 16rpx 16rpx;

	font-weight: 500;
	font-size: 32rpx;
	color: #ffffff;
	line-height: 60rpx;
	text-align: center;
	margin: auto;
	margin-top: 20rpx;
}
</style>
